#pragma once

#include <queue>
#include <string>

#include <Windows.h>

namespace Rorn
{
	namespace Chess
	{
		// A thread-safe message queue.  This could be made generic.
		class WinBoardInputQueue
		{
		public:
			WinBoardInputQueue(void);
			~WinBoardInputQueue(void);

			void AddMessage(const std::string& message);

			bool HasMessages() const;
			void GetNextMessage(std::string& message);
		private:
			mutable CRITICAL_SECTION containerAccessCriticalSection_;
			std::queue<std::string> messageQueue_;
		};
	}
}
